﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductList.aspx.cs" Inherits="ProjectQuaDep.Admin.Products.ProductList" %>

<%@ Register Src="../ControlAdmin/header-html.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Src="../ControlAdmin/Header.ascx" TagName="Header" TagPrefix="uc2" %>
<%@ Register Src="../ControlAdmin/Footer.ascx" TagName="Footer" TagPrefix="uc3" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<style type="text/css">
    .style2
    {
        height: 34px;
    }
</style>
<uc1:header ID="header1" runat="server" />
<body>
    <form id="form1" runat="server">
    <div class="wp100">
        <!--end header-->
        <uc2:Header ID="Header2" runat="server" />
        <div class="sanpham_vc">
            <div class="top_content">
                <h2 class="wp_auto">
                    Sản phẩm<span><%@ register src="../ControlAdmin/SubMenuProducts.ascx" tagname="SubMenuProducts"
                        tagprefix="uc4" %>
                        <uc4:SubMenuProducts ID="SubMenuProducts1" runat="server" />
                    </span>
                </h2>
            </div>
            <!--end top_content-->
            <div class="wp_auto tin_tuc">
                <div class="clear">
                </div>
                <div class="contentadmin">
                    <asp:Panel ID="pnUpdate" runat="server" Visible="false">
                        <fieldset style="padding: 10px">
                            <legend><b>XỬ LÝ THÔNG TIN</b></legend>
                            <table width="100%" style="line-height: 30px">
                                <tr>
                                    <td class="style1">
                                        Mã:
                                    </td>
                                    <td>
                                        <asp:Label ID="lblID" runat="server" Text=""></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Loại sản phẩm chính:
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlZone" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlZone_SelectedIndexChanged">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Chi tiết loại sản phẩm:
                                    </td>
                                    <td>
                                        <asp:CheckBoxList ID="cblZoneOther" runat="server" CellPadding="5" CellSpacing="5"
                                            Font-Bold="True" RepeatColumns="5" TabIndex="5">
                                        </asp:CheckBoxList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Tiêu đề:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtTitle" runat="server" Width="100%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Mô tả:
                                    </td>
                                    <td>
                                        <%--<asp:TextBox ID="txtDesc" runat="server" Width="100%" Height="61px" TextMode="MultiLine"></asp:TextBox>--%>
                                        <CKEditor:CKEditorControl ID="txtDesc" runat="server"></CKEditor:CKEditorControl>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Ảnh:
                                    </td>
                                    <td>
                                        <hr />
                                        <b>LINK ẢNH 1: </b>
                                        <asp:TextBox ID="txtImages" runat="server" Width="100%"></asp:TextBox><br />
                                        <b>LINK ẢNH 2: </b>
                                        <asp:TextBox ID="txtImages2" runat="server" Width="100%"></asp:TextBox><br />
                                        <b>LINK ẢNH 3: </b>
                                        <asp:TextBox ID="txtImages3" runat="server" Width="100%"></asp:TextBox><br />
                                        <b>LINK ẢNH 4: </b>
                                        <asp:TextBox ID="txtImages4" runat="server" Width="100%"></asp:TextBox><br />
                                        <b>LINK ẢNH 5: </b>
                                        <asp:TextBox ID="txtImages5" runat="server" Width="100%"></asp:TextBox><br />
                                        <iframe src="/Admin/MediaUpload.aspx" scrolling="no" frameborder="0" width="100%">
                                        </iframe>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Nội dung:
                                    </td>
                                    <td>
                                        <CKEditor:CKEditorControl ID="txtContent" runat="server"></CKEditor:CKEditorControl>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Nhân viên hỗ trợ:
                                    </td>
                                    <td>
                                        <asp:CheckBoxList ID="cblNhanVien" runat="server" RepeatColumns="3">
                                        </asp:CheckBoxList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Mã số sản phẩm:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtProductCode" runat="server" Width="100%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Người đăng:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtTacGia" runat="server" Width="100%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Sản phẩm liên quan:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtSanPhamLienQuan" runat="server" Width="100%"></asp:TextBox>
                                        <asp:Label ID="lblMsTinLienQuan" runat="server" ForeColor="#CC0000"></asp:Label>
                                        <asp:CheckBoxList ID="rbNewsRelation" runat="server">
                                        </asp:CheckBoxList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Giá:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtPrice" runat="server" Width="100%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Sale:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtSale" runat="server" Width="100%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Thời gian bảo hành(VD:12 tháng):
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtBaoHanh" runat="server" Width="100%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Giới hạn độ mới của sản phẩm:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtNgayConMoi" runat="server" Width="100%"></asp:TextBox>
                                        VD:(03/09/2013)
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Hãng sản xuất:
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlCompany" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Còn hàng:
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlCheckQuantity" runat="server">
                                            <asp:ListItem Value="1">Còn hàng</asp:ListItem>
                                            <asp:ListItem Value="0">Hết hàng</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Loại hình bán:
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlTypeSale" runat="server">
                                            <asp:ListItem Value="0">Hiện giá</asp:ListItem>
                                            <asp:ListItem Value="1">Liên hệ</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Sản phẩm hot:
                                    </td>
                                    <td>
                                        <asp:CheckBox ID="ckFocus" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Tags:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtTags" runat="server" Width="100%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Đặc tính lọc(VD:Full HD,Ngắn,Dài):
                                    </td>
                                    <td>
                                        <asp:CheckBoxList ID="cbListFinter" runat="server" RepeatColumns="5">
                                        </asp:CheckBoxList>
                                        <br />
                                        <asp:TextBox ID="txtFilter" runat="server" Width="100%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Sử Dụng:
                                    </td>
                                    <td>
                                        <asp:CheckBox ID="ckSelect" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                    </td>
                                    <td>
                                        <asp:Button ID="cmdUpdate" runat="server" Text="Cập nhật" OnClick="cmdUpdate_Click" />
                                        &nbsp;<asp:Button ID="cmdHide" runat="server" OnClick="cmdHide_Click" Text="Ẩn đi" />
                                        &nbsp;<asp:Label ID="lblMs" runat="server" ForeColor="#CC0000"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                    </asp:Panel>
                    <table>
                        <tr>
                            <td>
                                <b>NHÓM SẢN PHẨM:</b>
                            </td>
                            <td>
                                <asp:Panel ID="pnFind" runat="server">
                                    <asp:DropDownList ID="ddlZoneFind" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlZoneFind_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </asp:Panel>
                            </td>
                            <td>
                                <asp:RadioButtonList ID="rbTypeFind" runat="server" AutoPostBack="True" OnSelectedIndexChanged="rbTypeFind_SelectedIndexChanged"
                                    RepeatColumns="5">
                                    <asp:ListItem Selected="True" Value="1"> Mới nhất</asp:ListItem>
                                    <asp:ListItem Value="2"> Lượt xem nhiều nhất</asp:ListItem>
                                    <asp:ListItem Value="3"> Sản phẩm nổi bật trang chủ</asp:ListItem>
                                </asp:RadioButtonList>
                                <asp:RadioButtonList ID="rblStatus" runat="server" RepeatColumns="3" AutoPostBack="True"
                                    OnSelectedIndexChanged="rblStatus_SelectedIndexChanged">
                                    <asp:ListItem Value="1" Selected="True"> Đã Duyệt</asp:ListItem>
                                    <asp:ListItem Value="0"> Loại Bỏ</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                    </table>
                    <table cellpadding="5px" cellspacing="10px">
                        <tr>
                            <td class="style2">
                                <asp:ImageButton ID="cmdSearch" runat="server" ImageUrl="/Images/icon/search.png"
                                    OnClick="cmdSearch_Click" />
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtSearch" runat="server" Width="672px"></asp:TextBox>
                            </td>
                            <td class="style2">
                                <asp:ImageButton ID="cmdAdd" runat="server" ImageUrl="/Images/icon/Add.png" OnClick="cmdAdd_Click" />
                            </td>
                            <td class="style2">
                                <asp:Label ID="lblPage" runat="server" ForeColor="#CC0000"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <hr />
                    <asp:GridView ID="gvShow" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        OnRowCommand="gvShow_RowCommand" CellPadding="4" Width="100%" BackColor="White"
                        BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" OnPageIndexChanging="gvShow_PageIndexChanging">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div class="noidungadmin">
                                        <b>Sản phẩm:</b> <a target="_blank" href="<%# Eval(BO.Const.tbProducts.Url) %>" style="font-size: 14px;
                                            font-weight: bold; color: #333">
                                            <%# Eval("title") %></a> (ID:<%# Eval("ID") %>) - <b>Bảo hành:</b>
                                        <%# Eval(BO.Const.tbProducts.Warranty) %><br />
                                        <%# BO.Utils.ShowImagesByArr(Eval("Avatar").ToString())%>
                                        <br />
                                        <b>Mã sản phẩm nếu có:</b>
                                        <%# Eval(BO.Const.tbProducts.ProductCode) %><br />
                                        <b>Hãng sản xuất:</b>
                                        <%# Eval(BO.Const.tbCompanies.NameCp) %><br />
                                        <b>Hình thức bán:</b>
                                        <%# Eval(BO.Const.tbProducts.KieuBan) %>(<%# Eval(BO.Const.tbProducts.Checkhang) %>)<br />
                                        <b>Trạng thái:</b>
                                        <%# Eval("trangthai") %>
                                        - <b>Lượt xem:</b>
                                        <%# Eval(BO.Const.tbProducts.CountVisit) %>
                                        <br />
                                        <b>Giá bán:</b>
                                        <%# BO.Utils.ConvertMoneyNice(Eval("price").ToString()," vnđ") %>
                                        - <b>Giá sale:</b>
                                        <%# BO.Utils.ConvertMoneyNice(Eval("sale").ToString()," vnđ") %>
                                        <br />
                                        <b>Đặc tính lọc:</b> <span style="color: #F15A22">
                                            <%# Eval(BO.Const.tbProducts.FilterConditions) %>
                                        </span>
                                        <br />
                                        <b>Còn mới đến hết ngày:</b>
                                        <%#  BO.Utils.ShowDatetimeyyyyMMdd(Eval(BO.Const.tbProducts.EndDateNew).ToString(),"yyyyMMdd","dd/MM/yyyy") %>
                                        <br />
                                        <b>Ngày bán:</b>
                                        <%#  DateTime.Parse(Eval("DistributionDate").ToString()).ToString("dd/MM/yyyy HH:mm") %>
                                        <br />
                                        <b>Lần sửa cuối cùng:</b>
                                        <%#  DateTime.Parse(Eval("LastModifiedDate").ToString()).ToString("dd/MM/yyyy HH:mm")%>
                                        <br />
                                        <b><a href="/Admin/Products/DownloadProduct.aspx?ProductID=<%# Eval(BO.Const.tbProducts.id) %>"
                                            style="color: #AE0006" title="Cập nhật driver - doc - pdf" target="_blank">Cập nhật
                                            driver - doc - pdf </a></b>
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div class="noidungadmin">
                                        <asp:ImageButton ID="btnEdit" CommandName="cmdEdit" CommandArgument='<%# Eval("ID") %>'
                                            runat="server" ImageUrl="/Images/icon/gtk-edit.png" />
                                        &nbsp;&nbsp;&nbsp;
                                        <asp:ImageButton ID="btnNewsRelation" Text="Tin Liên Quan" CommandName="cmdNewsRelation"
                                            CommandArgument='<%# Eval("ID") %>' runat="server" ImageUrl="/Images/icon/NewsRelation.png" />
                                        &nbsp;&nbsp;&nbsp;
                                        <asp:ImageButton ID="btnRemove" Text="Xoá" CommandName="cmdRemove" CommandArgument='<%# Eval("ID") %>'
                                            runat="server" ImageUrl="/Images/icon/delete.png" />
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                        <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                        <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                        <RowStyle BackColor="White" ForeColor="#003399" />
                        <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                    </asp:GridView>
                </div>
            </div>
            <!--end auto-->
        </div>
        <!--end sanpham_vc-->
        <!--end footer_bt-->
        <uc3:Footer ID="Footer1" runat="server" />
    </div>
    <!--end wp100-->
    </form>
</body>
</html>
